<template>
  <div>
    <el-form
      ref="form"
      :model="formInline"
      label-width="75px"
      label-position="right"
      @submit.prevent
    >
      <filter-box :item-width="350" @search="refreshFormSysPost(true)" @reset="onReset">
        <el-form-item label="岗位名称">
          <el-input
            class="filter-item"
            v-model="formInline.user"
            :clearable="true"
            placeholder="岗位名称"
          />
        </el-form-item>
      
      </filter-box>
    </el-form>
    <el-form
      ref="form"
      :model="formInline"
      :inline="true"
      label-width="75px"
      label-position="right"
      @submit.prevent
    >
    <filter-box :item-width="350">
    <el-form-item>
          <el-button type="primary">新建</el-button>
        </el-form-item>
        <el-form-item>
          <el-button type="primary">批量导入</el-button>
        </el-form-item>
      </filter-box>
    </el-form>
    <el-table :data="tableData" style="width: 100%" max-height="250">
    <el-table-column fixed prop="date" label="Date" width="150" />
    <el-table-column prop="name" label="Name" width="120" />
    <el-table-column prop="state" label="State" width="120" />
    <el-table-column prop="city" label="City" width="120" />
    <el-table-column prop="address" label="Address" width="600" />
    <el-table-column prop="zip" label="Zip" width="120" />
    <el-table-column fixed="right" label="Operations" width="120">
      <template #default="scope">
        <el-button
          link
          type="primary"
          size="small"
          @click.prevent="deleteRow(scope.$index)"
        >
          Remove
        </el-button>
      </template>
    </el-table-column>
  </el-table>
  </div>
</template>

<script lang="ts">
export default {
  name: 'customer',
};
</script>

<script setup lang="ts">
import { Plus } from '@element-plus/icons-vue';
import {
  CascaderNodePathValue,
  CascaderNodeValue,
  CascaderValue,
  ElMessage,
  ElMessageBox,
} from 'element-plus';
import {CustomerListController} from '@/api/customer/index';
import TableBox from '@/components/TableBox/index.vue';
import { treeDataTranslate } from '@/common/utils';
import { SysUserStatus, SysUserType } from '@/common/staticDict/index';
import { User, UserInfo } from '@/types/upms/user';
import { usePermissions } from '@/common/hooks/usePermission';
import { ANY_OBJECT } from '@/types/generic';
import { useDialog } from '@/components/Dialog/useDialog';
import { TableOptions } from '@/common/types/pagination';
import { useTable } from '@/common/hooks/useTable';
import { TableData } from '@/common/types/table';
import { useDropdown } from '@/common/hooks/useDropdown';
import { DropdownOptions, ListData } from '@/common/types/list';
import { useDate } from '@/common/hooks/useDate';
import { useLayoutStore } from '@/store';
import EditUserForm from '../formEditSysUser/index.vue';
const layoutStore = useLayoutStore();

const Dialog = useDialog();
const mainContextHeight = inject('mainContextHeight', 200);
const form = ref();
const deptIdPath = ref<Array<string | number>>([]);
  const formInline = reactive({
  user: '',
  region: '',
  date: '',
})

  const tableData = ref([
])
const pageSize = ref(20);// 每页加载的数据量
const pageNum = ref(1); 
const onReset = () => {
  getcustomerList();
};
/**
 * 更新岗位管理
 */
 const refreshFormSysPost = (reloadData = false) => {
     getcustomerList();
};
//获取列表数据
function getcustomerList(){
  let params={
    pageNum:pageNum.value,
    pageSize:pageSize.value,
  };
  CustomerListController.view(params)
  .then((res)=>{
    console.log(res,11);
  })


}
onMounted(() => {
  getcustomerList();
});
</script>
